UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JMDaTd7B9hce9QFQGkw3cvm513HvR/GDnUmi0KXIMTI='
WHERE
key_id = '2b8f1d5105f5f43f493ee17937cf9794e79dab3fea05ee803612e34dcdb8eb2e'
AND (
token = 'JMDaTd7B9hce9QFQGkw3cvm513HvR/GDnUmi0KXIMTI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)