UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rbquV+2+xhFTFes88NFFYQHWdprOE8RYqHpknjUot5Y='
WHERE
key_id = '486bd70e8700179d99230fa834dc759b8596ed19a0adc76b4fb404eb721e26c0'
AND (
token = 'rbquV+2+xhFTFes88NFFYQHWdprOE8RYqHpknjUot5Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)