UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eiHxWF+qBHO9IS3UUOJ/1ArA9bbDLWeU2O47z7xGrC8='
WHERE
key_id = '1c5ea48e78576ceb69e9bda30f41b48518ca1986ea12fdc3053bdf401f853d71'
AND (
token = 'eiHxWF+qBHO9IS3UUOJ/1ArA9bbDLWeU2O47z7xGrC8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)