UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Eh8GbhEXDG6QHieWQ/WzCQdEp8jXqCODqMoQmLuxvOM='
WHERE
key_id = 'ab2243b5e9823cb2f29fee9e39a862609806a2baacb09f0bf1ebd5a2544cb95e'
AND (
token = 'Eh8GbhEXDG6QHieWQ/WzCQdEp8jXqCODqMoQmLuxvOM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)