UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RaQ05EQhoDdRfsXy/WHiwjw4XW9KwaZD/+9uWoSiBGY='
WHERE
key_id = '27dff37d93556a56c137bdf6e3a6fdbb8d7387eaae9285fc8541a4d684062020'
AND (
token = 'RaQ05EQhoDdRfsXy/WHiwjw4XW9KwaZD/+9uWoSiBGY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)