UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ov8Mbguz3Sxm28zljXwZCdjnw9/Y8nk7/LP5juoVkXc='
WHERE
key_id = '207aa99b8f8f3dade9892dcf46e841bb1020a62f8a05fd0f954451f71bf537ef'
AND (
token = 'Ov8Mbguz3Sxm28zljXwZCdjnw9/Y8nk7/LP5juoVkXc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)