UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LMhIEu7TteS2gjcf3pNOYHdhhP/bNeU/IGSlccWzM8I='
WHERE
key_id = '02dfb68665a657f754ab85d74f59b82729d2620bad809ab03eb993975d9276c4'
AND (
token = 'LMhIEu7TteS2gjcf3pNOYHdhhP/bNeU/IGSlccWzM8I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)