UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Db8tzCGFdXkFxENMNmRN8eHwaLlw9Ufa7FGuoiQILWg='
WHERE
key_id = '080f7057498b1dedadb1212449bd814c463d35aa94cae58f6540f0575aecc6ba'
AND (
token = 'Db8tzCGFdXkFxENMNmRN8eHwaLlw9Ufa7FGuoiQILWg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)