UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yt/RBuZLeWpePO1CvLLkVAM92IIlTdE+bm9p8kE1kh0='
WHERE
key_id = '4bc11700d074127cbbd7bed7abcca80ea66aa51951146ad6980c78fe2c36bbd5'
AND (
token = 'yt/RBuZLeWpePO1CvLLkVAM92IIlTdE+bm9p8kE1kh0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)