UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yFvOzl516B3Gm96zO0ijvl5YfIQTbGRmybSMDo4MAbw='
WHERE
key_id = '2ab44b78f699deb5f20d084a7ef8c5ccf469ec5f71b71506ec84fa845b6bb0ac'
AND (
token = 'yFvOzl516B3Gm96zO0ijvl5YfIQTbGRmybSMDo4MAbw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)