UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JOuwP9UYVqXw2jV6CvjM/VdK6A4WurTeubmhN8UcQLI='
WHERE
key_id = 'acfba453d1251e6b2694966000617320fce6306fc9b6c9845f9ff803222ef611'
AND (
token = 'JOuwP9UYVqXw2jV6CvjM/VdK6A4WurTeubmhN8UcQLI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)