UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9XmevUnauYYrj2S4i074grCdDI8feZocD3kDbpXWC0o='
WHERE
key_id = '5e0b3ea90afe0ae0935443449609a162d2941e90cd18c0067a924a4ac6dc61a7'
AND (
token = '9XmevUnauYYrj2S4i074grCdDI8feZocD3kDbpXWC0o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)