UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/kRxGeQT6XPJ+P/PlKiXTmsDZp3y7Av9qmtghE7IgI8=' 
WHERE 
  key_id = '43fb77bfba4dba54e6cd21a72de934b7dbfb7ad16b12f8e349cf7824c614a871' 
  AND (
    token = '/kRxGeQT6XPJ+P/PlKiXTmsDZp3y7Av9qmtghE7IgI8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038