UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+z12i9S5scYNheIL40ZNcBOPU3bF9ZnB79wymnlBjqM='
WHERE
key_id = '795fb7c89a4ce8554f2f7cbed3d2ab912940f26672344e26374bc25f175f654e'
AND (
token = '+z12i9S5scYNheIL40ZNcBOPU3bF9ZnB79wymnlBjqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)