UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2IRm0TVsMVe1eC++Y5wgkZfRs22Mn98mAW1wZmXwFmw='
WHERE
key_id = '6a7b9811c050e72302d40df7fa605e5b783d43c71b0c0fff089c90ca9c8124c4'
AND (
token = '2IRm0TVsMVe1eC++Y5wgkZfRs22Mn98mAW1wZmXwFmw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)