UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4YI/R5HrUf1wJACyDbdWqkMFwbUIs+Tf5171RDEwvAw='
WHERE
key_id = '0bd575a644ce75f809fd05af8e906f08dace958216e1736bc2e5f63ae6e73f67'
AND (
token = '4YI/R5HrUf1wJACyDbdWqkMFwbUIs+Tf5171RDEwvAw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)