UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QXsfkJYLz5RIiYN/O4M2n7FyluLGgNZlHMijqbmf/yk='
WHERE
key_id = '47b5c590a15dfdfe0138abc0e02a899eef2f1efd195f133fe85e9a3b142d4b93'
AND (
token = 'QXsfkJYLz5RIiYN/O4M2n7FyluLGgNZlHMijqbmf/yk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)