UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PIXZo03Hc/lKMW7c3h7KJ6UKiSrUE168cKnM67PNU+o='
WHERE
key_id = '28fbf44a4bec4310c26055923265b4d5705dc7e35b79c6f02e0aa3b92000dd88'
AND (
token = 'PIXZo03Hc/lKMW7c3h7KJ6UKiSrUE168cKnM67PNU+o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)