UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8rRAid3+nxFm9HmxOb3ZDXLZjaRGistprt73YChq6O8='
WHERE
key_id = '7308cdd39a7ef9aef7020c93960169d9a6cac2b24fe9d0619c26643cec0fd716'
AND (
token = '8rRAid3+nxFm9HmxOb3ZDXLZjaRGistprt73YChq6O8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)