UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zXUduQcczdDq48wCHowlTYBFCvO8ZDk7SUeD4aNwe3I='
WHERE
key_id = '262983a144b76ef5b0a31f9536dd5e9e8884c06d52eb61568e8d24f5cf05da06'
AND (
token = 'zXUduQcczdDq48wCHowlTYBFCvO8ZDk7SUeD4aNwe3I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)