UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kXrQxBDsAVZriQLNi/QnIfLySBy+uGdejTCkbY47FP4='
WHERE
key_id = 'bb192022450e37c7bb59e37f86fc47327189b810a39f8b8b3a25b55a28f286bb'
AND (
token = 'kXrQxBDsAVZriQLNi/QnIfLySBy+uGdejTCkbY47FP4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)