UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u+OJt5m9OnOWLn8Vc16La/sOsd9eqfxIyXQ9mSK7MTM='
WHERE
key_id = '7a628a43425635d132ed5fa30913322c7954d824c35063554d972b94245df783'
AND (
token = 'u+OJt5m9OnOWLn8Vc16La/sOsd9eqfxIyXQ9mSK7MTM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)