UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CM+ltmVbcmT/8FAh+LbzR9en7czeqqUXY6Yd5CZn7JU='
WHERE
key_id = '7c38ac17b1b2dfce27b43787abf792607c60646bbac05486b3032ee9da6bfc45'
AND (
token = 'CM+ltmVbcmT/8FAh+LbzR9en7czeqqUXY6Yd5CZn7JU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)