UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VeiAIWpZFXOlIE7hLadhtENXEsRNXKUcWg5WbsPeaA='
WHERE
key_id = '5af09f4a607df8b42d4d0dbb0d2c24eb959bb1ca9583c565460efc12dc33bf15'
AND (
token = '+VeiAIWpZFXOlIE7hLadhtENXEsRNXKUcWg5WbsPeaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)