UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EzjfZXPgLvxshyY8FB/sgBNetxDpEvtqEnZmNvvOYR0='
WHERE
key_id = '20fda85603943aec1ca09b878fcceec0d30dca039306afa5c488489fc56c0d43'
AND (
token = 'EzjfZXPgLvxshyY8FB/sgBNetxDpEvtqEnZmNvvOYR0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)