UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'arjFmisEnX6Y5UG8w7IxIcaaeORZq1/hMrrkZcF0qsM='
WHERE
key_id = 'b7f72bf92fbe9285afe96324ec863e3e1434d36f7fdde77132a0761863ba4653'
AND (
token = 'arjFmisEnX6Y5UG8w7IxIcaaeORZq1/hMrrkZcF0qsM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)