UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Iqaf2yB0vJjaTiQqILDR9eO4nx1/r5oJt6ZDdsxeFc='
WHERE
key_id = '3056c3f642804d0726771277b694faf5b0be0efdd7b23397012494e9fd095576'
AND (
token = '2Iqaf2yB0vJjaTiQqILDR9eO4nx1/r5oJt6ZDdsxeFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)