UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2zPbC7vFDFDnpCtMgVLaUj9t2mzvwlTE4X0P/P6EiWg='
WHERE
key_id = '5cc95c98b7f2e069d126537103deaed84ae947b4d7c9363cac2ad2acb53faa7a'
AND (
token = '2zPbC7vFDFDnpCtMgVLaUj9t2mzvwlTE4X0P/P6EiWg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)