UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'W5+/TXWm0NlyzBsT2ciCUipVPgCze4VuQd7dC02Hrlk='
WHERE
key_id = 'e4b888ee59fdfbd652979a4184f24ce629db2f0a0a4cab84cb3f9e6aa30d889c'
AND (
token = 'W5+/TXWm0NlyzBsT2ciCUipVPgCze4VuQd7dC02Hrlk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)