UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LtKliyfDBvfhg9/XfqQq9GN0Gido9Dpg8vBKSXBDq7o='
WHERE
key_id = '1a4cf8d8c4cd4d37a487bca33775cdbe3c1149dc66d6cc889a752b9a169e74c2'
AND (
token = 'LtKliyfDBvfhg9/XfqQq9GN0Gido9Dpg8vBKSXBDq7o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)