UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j3NGR8iY+4Oz79xhwrKBpIY+7RLUrOD3wO3NvWaRZq0='
WHERE
key_id = '14bd3e71da8c360901b621a4d2a4b1261f1cd9c57ed9bb27d8d278d4f32327ae'
AND (
token = 'j3NGR8iY+4Oz79xhwrKBpIY+7RLUrOD3wO3NvWaRZq0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)