UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0DZd7o/MHfNG48KEGlQESGDI16S7YCEKLe+TutKxV7E='
WHERE
key_id = '633ed54a25c28951c308004e9488a456be36ff5aee79f7aa6446d46fc305a516'
AND (
token = '0DZd7o/MHfNG48KEGlQESGDI16S7YCEKLe+TutKxV7E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)