UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Fa2E/CVECKZ0041yD1xsyU2/D5WsUqTNrlO3z8fT66M=' 
WHERE 
  key_id = 'a94ef33bfd55c1e5baa0b308b605bffd7cb6009e5d8e640477818df2ad625bc2' 
  AND (
    token = 'Fa2E/CVECKZ0041yD1xsyU2/D5WsUqTNrlO3z8fT66M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031