UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TLLChERHLvqGUSBtZq1+WdYc/96p7O/rnSPV2Vo05rg='
WHERE
key_id = '1eb9b57db022cd09446d18ecc80db365f084eaf9f2345d172a1855824faedb92'
AND (
token = 'TLLChERHLvqGUSBtZq1+WdYc/96p7O/rnSPV2Vo05rg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)